﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>

<script type="text/javascript">
    function closeWin() {
        //不加这句就会有提示框弹出！
        //window.opener = null;
        //window.close();
        $.ajax({
            url: '<%=Url.Action("LogOfF","Login") %>',
            type: "POST"
        });

        //alert("注销成功");
        window.location.replace('<%=Url.Action("LogOn","Login") %>');
    }

    function openUserInfo() {
        addtab("user-room", "用户空间");
        $("#workarea-user-room").load("/Home/UserInfo");
    }

    function openChangePsw() {
        addtab("psw", "修改密码");
        $("#workarea-psw").load("/Home/ChangePsw");
    }

    function openUserSetting() {
        addtab("usersetting", "基础设置");
        var tmp = parseInt(100 * Math.random());
        $("#workarea-usersetting").load("/Home/UserSetting?id=" + tmp);
    }

    function updateStatus() {
        $.ajax({
            type: "POST",
            url: "/Home/UpdateLoginTime"
        });
    }

    // 获得在线用户数量
    function perCount() {
        $.ajax({
            type: "POST",
            url: "/Home/PersonCount",
            success: function(data) {
                $("#person_count").html(data);
            }
        });
    }
</script>

<div id="calender" style="width: 170px; height: 170px; padding-left: 60px; margin-top: 10px;">
</div>
